package mango.orm.entity;

import java.io.Serializable;

@SuppressWarnings("serial")
public class EntityField implements Serializable, Cloneable {
    private String name;
    private Object value;
    private int jdbcType;
    private boolean primary;

    public EntityField(String name, Object value, int jdbcType, boolean primary) {
        this.name = name;
        this.value = value;
        this.jdbcType = jdbcType;
        this.primary = primary;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public int getJdbcType() {
        return jdbcType;
    }

    public void setJdbcType(int jdbcType) {
        this.jdbcType = jdbcType;
    }

    public boolean isPrimary() {
        return primary;
    }

    public void setPrimary(boolean primary) {
        this.primary = primary;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return new EntityField(this.name, this.value, this.jdbcType, this.primary);
    }

}
